﻿using Volo.Abp.BackgroundJobs;
using Volo.Abp.Localization;
using Volo.Abp.Localization.ExceptionHandling;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
using Xms.Abp.Data;
using Xms.Abp.Modularity;
using Xms.Abp.Settings;
using Xms.Abp.Smsing.Localization;

namespace Xms.Abp.Smsing;

[DependsOn(
    typeof(AbpBackgroundJobsAbstractionsModule),
    typeof(XmsAbpDataModule),
    typeof(XmsAbpSettingsModule)
    )]
public class XmsAbpSmsingModule: XmsModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        Configure<AbpVirtualFileSystemOptions>(options =>
        {
            options.FileSets.AddEmbedded<XmsAbpSmsingModule>();
        });

        Configure<AbpLocalizationOptions>(options =>
        {
            options.Resources
                .Add<SmsingResource>("en")
                .AddVirtualJson("/Smsing/Localization/Resources");
        });

        Configure<AbpExceptionLocalizationOptions>(options =>
        {
            options.MapCodeNamespace("Smsing", typeof(SmsingResource));
        });
    }
}

